package com.jdd.modules.sdk.ledcall;

import com.jdd.common.constant.JddConstant;
import com.jdd.common.constant.LedConstant;
import com.jdd.common.util.DateUtils;
import com.jdd.modules.sdk.LedCallInterface;
import com.jdd.modules.sdk.SdkCallInterface;
import com.jdd.modules.sdkidentifyresultpushlog.entity.DiscountCouponDetail;
import com.jdd.modules.sdkidentifyresultpushlog.entity.ParkOrderInfoVO;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Date;

/**
 * author:lcy
 * since 2021/8/11 17:53
 */
@Component
@Lazy
@Primary
public class QianYiLedCallInterface extends LedCallInterface {
    @Resource
    private SdkCallInterface sdkCallInterface;

    /**
     * @return
     * @Description 无牌车入口显示播报
     * @author lcy
     * @Date 2021-08-10
     */
    @Override
    public void EntranceUnlicensed(String serialNo) {
        String str = "无牌车,请与管理员联系";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "无牌车", LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "请与管理员联系", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @param serialNo
     * @return
     * @Description 军警车入场播报
     * @author lcy
     * @Date 2021-08-10
     */
    @Override
    public void EntranceSpecial(String serialNo, String plateNo) {
        String str = plateNo + ",欢迎光临";
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "欢迎光临", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @return void
     * @author lcy
     * @date 2021/8/12 14:11
     * @Description 白名单过期按照临时车
     */
    @Override
    public void EntranceParkWhiteOver(String serialNo, String plateNo) {
        String str = "月卡车,"+plateNo + ",已过期";
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "临时车", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @return void
     * @author lcy
     * @date 2021/8/12 14:12
     * @Description 月租车过期禁止进入
     */
    @Override
    public void BanMonthOver(String serialNo, String plateNo, Date endTimes,String broadcastInfo) {
        String str = "月卡车," + plateNo + ",已过期,请与管理员联系";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "禁止入场", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @return void
     * @author lcy
     * @date 2021/8/12 14:13
     * @Description 过期N天不可进入
     */
    @Override
    public void BanMonthOverDay(String serialNo, String plateNo, Date endTimes){
        String str = "月卡车" + plateNo + ",已过期,请与管理员联系";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "已过期,请与管理员联系", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @return void
     * @author lcy
     * @date 2021/8/12 14:14
     * @Description 过期N天内可进入
     */
    @Override
    public void EnranceMonthOverCan(String serialNo, String plateNo) {
        String str = "月卡车," + plateNo + ",已过期";
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "欢迎光临", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @param serialNo
     * @return
     * @Description 月租车过期按照临时车收费播报
     * @author lcy
     * @Date 2021-08-10
     */
    @Override
    public void EntranceMonthlyOverdue(String serialNo, String plateNo){
        String str = "月卡车," + plateNo + ",已过期";
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "欢迎光临", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @param serialNo
     * @return
     * @Description 月租车入场播报
     * @author lcy
     * @Date 2021-08-10
     */
    @Override
    public void MonthlyEntrance(String serialNo, String plateNo,String broadcastInfo){
        // 按月租车入场
        String str = "月卡车," + plateNo + ",欢迎光临";
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "欢迎光临", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * 月租车出场
     * @param serialNo
     * @param plateNo
     * @param broadcastInfo
     * @return
     * @author renshangyi
     * @date 2022/4/1
     */
    @Override
    public void outMonthlyEntrance(String serialNo, String plateNo, String broadcastInfo) {
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, broadcastInfo, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "一路顺风", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, broadcastInfo);
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
    }

    /**
     * @param serialNo
     * @return
     * @Description 黑名单禁止通行播报
     * @author lcy
     * @Date 2021-08-10
     */
    @Override
    public void EntranceBlacklist(String serialNo, String plateNo) {
        //如果是黑名单并且iFBroadcast为false 则限制入场
        String str = "车牌号为," + plateNo + ",此车为黑名单车辆,禁止入场";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "禁止入场", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @param serialNo
     * @return
     * @Description 禁行时间段内播报
     * @author shangyue
     * @Date 2021-08-10
     */
    @Override
    public void JudgeStopDay(String serialNo, String plateNo) {
        String str = "该时段不允许进入";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "禁止入场", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @return void
     * @author lcy
     * @date 2021/8/12 14:18
     * @Description 储值车配置自动开闸
     */
    @Override
    public void EntranceStoredInConfig(String serialNo, String plateNo) {
        String str = "储值车," + plateNo + ",欢迎光临";
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "欢迎光临", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @return void
     * @author lcy
     * @date 2021/8/12 14:19
     * @Description 储值车配置手动开闸
     */
    @Override
    public void StoredInConfig(String serialNo, String plateNo) {
        String str = "请与管理员联系,  ";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "请与管理员联系", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "人工放行", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @return void
     * @author lcy
     * @date 2021/8/12 14:19
     * @Description 储值车无配置自动开闸
     */
    @Override
    public void EntranceStoredNoConfig(String serialNo, String plateNo) {
        String str = "储值车," + plateNo + ",欢迎光临";
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "欢迎光临", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @param serialNo
     * @return
     * @Description 临时车入场播报
     * @author shangyue
     * @Date 2021-08-10
     */
    @Override
    public void TemporaryEntrance(String serialNo, String plateNo){
        String str = "临时车," + plateNo + ",欢迎光临";
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "欢迎光临", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @return void
     * @author lcy
     * @date 2021/8/12 14:22
     * @Description 临时车入场开闸方式 1 自动开闸
     */
    @Override
    public void TemporaryEntranceInConfig(String serialNo, String plateNo) {
        String str =sdkCallInterface.getOverdueType(plateNo)+ "临时车," + plateNo + ",欢迎光临";
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "欢迎光临", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @return void
     * @author lcy
     * @date 2021/8/12 14:22
     * @Description 临时车入场开闸方式 2 确认开闸
     */
    @Override
    public void TemporaryInConfig(String serialNo, String plateNo) {
        String str = sdkCallInterface.getOverdueType(plateNo)+"人工放行,请与管理员联系";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "人工放行", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @param serialNo
     * @return
     * @Description 临时车入场开闸方式 3、不开闸
     * @author shangyue
     * @Date 2021-08-10
     */
    @Override
    public void TemporaryBanEntrance(String serialNo,String plateNo) {
        String str =sdkCallInterface.getOverdueType(plateNo)+ "临时车,禁止入场";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "临时车", LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "禁止入场", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @param serialNo
     * @return
     * @Description 临时车入场车位已满, 禁止通行播报
     * @author shangyue
     * @Date 2021-08-10
     */
    @Override
    public void TemporaryEntranceParkingFull(String serialNo, String plateNo) {
        String str = sdkCallInterface.getOverdueType(plateNo)+"临时车,车位已满";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "临时车", LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "禁止入场", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * 临时车位已满 确认开闸
     *
     * @param serialNo
     * @param plateNo
     * @return void
     * @author jdd孙庆伟
     * @date 2021/8/31 14:58:26
     * @version 1.0
     */
    @Override
    public void TemporaryEntranceFullConfirmOpened(String serialNo, String plateNo) {
        String str = sdkCallInterface.getOverdueType(plateNo)+"临时车,车位已满,请与管理员联系";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "临时车", LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "人工放行", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    //---------------------------出场------------------------------

    /**
     * @author lcy
     * @date 2021/8/13
     * @Description 无牌车出场
     */
    @Override
    public void OutUnlicensed(String serialNo) {
        String str = "无牌车,请与管理员联系";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "无牌车", LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "请与管理员联系", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @author lcy
     * @date 2021/8/13
     * @Description 特殊车出场
     */
    @Override
    public void OutSpecial(String serialNo, String plateNo) {
        String str = "祝您一路顺风,  ";
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "祝您一路顺风", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "军警车免费通行", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @author lcy
     * @date 2021/8/13
     * @Description 白名单出场
     */
    @Override
    public void OutParkWhite(String serialNo, String plateNo) {
        String str = "祝您一路顺风,  ";
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "祝您一路顺风", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "请通过", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);

    }

    /**
     * @author lcy
     * @date 2021/8/13
     * @Description 月租车出场
     */
    @Override
    public void OutMonthly(String serialNo, String plateNo) {
        String str = "祝您一路顺风,  ";
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "祝您一路顺风", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "月卡车", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);

    }

    /**
     * @author lcy
     * @date 2021/8/13
     * @Description 调用计费规则异常处理
     */
    @Override
    public void OutAbnormal(String serialNo, String plateNo) {
        String str = "请与管理员联系 ";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "请与管理员联系", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "禁止出场", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @author lcy
     * @date 2021/8/13
     * @Description 无异常 无入场记录不抬杆
     */
    @Override
    public void OutAbnormalBan(String serialNo, String plateNo) {
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "请与管理员联系", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "禁止出场", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, "请与管理员联系,  ");

    }

    /**
     * @author lcy
     * @date 2021/8/13
     * @Description 无异常 无入场记录免费放行
     */
    @Override
    public void OutAbnormalCan(String serialNo, String plateNo) {
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "祝您一路顺风", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "请通行", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, "祝您一路顺风,  ");

    }

    /**
     * @author lcy
     * @date 2021/8/13
     * @Description 停车费已支付处理
     */
    @Override
    public void OutPayParkingFee(String serialNo, String plateNo) {
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "祝您一路顺风", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "收费0元", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, "祝您一路顺风,  ");
    }

    /**
     * @author lcy
     * @date 2021/8/13
     * @Description 使用免费时长券/全免券/小时券的订单
     */
    @Override
    public void OutDiscount(String serialNo, String plateNo, DiscountCouponDetail discountCouponDetail) {
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "祝您一路顺风", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "请通行", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, "祝您一路顺风,  ");
    }

    /**
     * @author lcy
     * @date 2021/8/13
     * @Description 储值车无入场纪录
     */
    @Override
    public void OutStoredNoInLogs(String serialNo, String plateNo) {
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "未找到车辆入场记录", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "无入场纪录", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, "请与管理员联系,  ");
    }

    /**
     * @author lcy
     * @date 2021/8/13
     * @Description 储值车缴费出场
     */
    @Override
    public void OutStoredPayFee(String serialNo, String plateNo, Integer unpayFee, Integer remaining, ParkOrderInfoVO parkOrderInfoVO) {
        String remainingStr = remaining + ".00";
        String str = "储值车," + plateNo + ",停车时长" + DateUtils.qianyiTurnDayHourMinuteString(String.valueOf(parkOrderInfoVO.getChargeDuration()))
                + ",收费" + unpayFee + "元" + ",剩余金额" + remainingStr + "元";
        String fourLineStr = "收费" + unpayFee + "元";
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, fourLineStr, LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * @author lcy
     * @date 2021/8/13
     * @Description 调用计费规则异常处理
     */
    @Override
    public void OutStoredChargeAbnormal(String serialNo, String plateNo) {
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "请与管理员联系", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "禁止出场", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, "请与管理员联系, ");
    }

    /**
     * @author lcy
     * @date 2021/8/13
     * @Description 播报收费信息
     */
    @Override
    public void OutShowFee(String serialNo, String plateNo, ParkOrderInfoVO parkOrderInfo) {
        String str = parkOrderInfo.getPlateNo() + ",收费" + Integer.parseInt(parkOrderInfo.getChargeUnpaid()) / 100 + ".00元" +
                ",停车时长" + DateUtils.qianyiTurnDayHourMinuteString(String.valueOf(parkOrderInfo.getChargeDuration()));
        String chargeStr = "收费" + Integer.parseInt(parkOrderInfo.getChargeUnpaid()) / 100 + "元";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, chargeStr, LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    @Override
    public void RefuseCarEnter(String serialNo, String plateNo) {
        String str="禁止入场,请与管理员联系";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * 重复入场确认开闸
     */
    @Override
    public void repeatRecognitionConfirmOpened(String serialNo, String plateNo) {
        String str = plateNo + "重复入场";
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, str, LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "人工放行", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, str);
    }

    /**
     * 月租车出场 播报收费信息
     * @param serialNo
     * @param plateNo
     * @param broadcastInfo
     * @return
     * @author renshangyi
     * @date 2022/4/1
     */
    @Override
    public void OutMonthlyShowFee(String serialNo, String plateNo, String broadcastInfo) {
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "月租车", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, broadcastInfo, LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, broadcastInfo);
    }

    /*** 功能描述: 场内码支付成功得，加上去缴费成功
     * @Author: lcy
     * @Date: 2022/1/19
     */
    @Override
    public void FieldFee(String serialNo, String plateNo) {
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "祝您一路顺风", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "缴费成功", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, plateNo+",缴费成功,一路顺风");
    }

    /**
     * 临时车不收费出场
     * @param serialNo
     * @param plateNo
     */
    @Override
    public void FieldFeeOut(String serialNo, String plateNo) {
        sdkCallInterface.SdkUnfoldAll(JddConstant.SdkOpenGateLog.SWICH_TYPE_ONE, serialNo, plateNo);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "祝您一路顺风", LedConstant.qyOneLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, plateNo, LedConstant.qyThreeLine);
        sdkCallInterface.Sdk485TestContentCommunicationAll(serialNo, "小心慢行", LedConstant.qyFourLine);
        sdkCallInterface.Sdk485VoiceCommunicationAll(serialNo, plateNo+",一路顺风");
    }
}
